package ctrlLayer;

import java.util.ArrayList;

import dbLayer.DbProduct;
import modelLayer.Product;

public class CtrProduct {

	
	private DbProduct dbp;
	/**
	 * 
	 */
	public CtrProduct() {
		dbp = new DbProduct();
	}
	
	/**
	 * Method for retrieving a product from the productID
	 * @param productId The id for the wanted product
	 * @return The wanted product
	 */
	public Product retrieveProduct(int productId){
		Product pObj = dbp.retrieveProductFromDb(productId);
		return pObj;
	}
	
	public ArrayList<Product> retrieveAllProducts() {
		return dbp.retrieveAllProducts();
	}
	
	
	
}
